package Demo5;

import java.util.Scanner;

public class Main2 {
    static int flag=0;

    public static void main(String[] args) {
        Thread t1=new Thread(()->{
           while(flag==0){

           };
            System.out.println("t1线程结束");
        });
t1.start();
        Scanner in=new Scanner(System.in);
        System.out.println("请输入falg的值：");
        flag=in.nextInt();

    }
}
